/* Основные стили проекта. Это стили для темы, которую вы верстаете первой. */

.page {
  /* сохраните в разметке и стилях класс page. На его основе работает скрипт. */
  font-size: var(--text-default-size, 18px);
  font-family: var(--fonts, 'Courier New', Courier, monospace);
  line-height: var(--line-height-main);
  background-image: var(--background-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.link {
  text-decoration: none;
  border: solid 1px transparent;
  text-shadow: 2px 2px 0px var(--accent-color);
}

.link:hover {
  border-bottom: solid 1px var(--text-color);
}

.link:focus {
  outline: none;
}

.link:focus-visible {
  border: solid 1px var(--text-color);
}

.header {
  position: relative;
  display: grid;
  grid-template-rows: 1fr min-content 1fr;
  block-size: 100dvb;
  padding: var(--padding-header-footer);
  margin-bottom: var(--margin-between);
}

.decorated-zone::before,
.decorated-zone::after {
  content: "";
  display: block;
  position: absolute;
  width: 25px;
  height: 25px;
}

.decorated-zone::before {
  top: var(--padding-header-footer);
  right: var(--padding-header-footer);
  border-top: 1px solid var(--accent-decorations-color);
  border-right: 1px solid var(--accent-decorations-color);
}

.decorated-zone::after {
  bottom: var(--padding-header-footer);
  left: var(--padding-header-footer);
  border-bottom: 1px solid var(--accent-decorations-color);
  border-left: 1px solid var(--accent-decorations-color);
}

.header__lamp {
  position: absolute;
  text-transform: uppercase;
  display: var(--header-lamp-display);
  align-items: center;
  gap: 10px;
  top: var(--padding-header-footer);
  right: calc(9px + var(--padding-header-footer));
  line-height: 25px;
  color: var(--accent-decorations-color);
}

.header__lamp::after {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  background-color: var(--accent-decorations-color);
  border-radius: 50%;
  filter: drop-shadow(0px 0px 4px var(--accent-decorations-color));
}

.header__title {
  position: relative;
  font-size: var(--text-header-footer-size);
  color: var(--title-color);
  text-shadow: 4px 4px 0px var(--title-shadow-color);
  line-height: var(--line-height-title);
  align-self: center;
  left: var(--inset-left-header-title);
}

.header__content {
  align-self: center;
  justify-self: end;
}

@media (min-width: 768px) {
  .header__content {
    max-width: 50%;
  }
}

.header__text {
  font-weight: 700;
}

.header__theme-menu {
  align-self: center;
}

.header__theme-menu-list {
  display: grid;
  justify-content: end;
  gap: 10px;
}

.header__theme-menu-button {
  padding: 0px 13px;
  color: var(--accent-decorations-color);
  text-transform: lowercase;
  line-height: 100%;
  background-color: transparent;
  border: 1px solid transparent;
  height: 26px;
}

.header__theme-menu-button:hover {
  border: 1px solid var(--accent-transparent-color);
  cursor: pointer;
}

.header__theme-menu-button:focus {
  outline: none;
}

.header__theme-menu-button:focus-visible {
  border-bottom: 1px solid var(--accent-decorations-color);
}

.header__theme-menu-button_active {
  border: 1px solid var(--accent-decorations-color);
}

.header__theme-menu-button_active:hover {
  border: 1px solid var(--accent-decorations-color);
  cursor: initial;
}

@media (min-width: 992px) {
  .header__theme-menu {
    align-self: start;
    justify-self: center;
  }

  .header__theme-menu-list {
    grid-auto-flow: column;
  }
}

.main {
  margin-top: var(--margin-between);
  margin-bottom: var(--margin-between);
  padding: var(--padding-main);
  display: grid;
  row-gap: var(--row-gap-main);
}

.section {
  display: grid;
  row-gap: 20px;
  column-gap: 20px;
}

@media (min-width: 768px) {
  .section {
    grid-template-columns: 1fr 2fr;
  }

  .section:nth-of-type(even) .section__content {
    grid-row-start: 2;
    grid-column: 1 / 3;
  }
}

@media (min-width: 992px) {
  .section {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .section__content {
    grid-column: 2 / 4;
  }

  .section:nth-of-type(even) .section__content {
    grid-template-columns: 1fr 1fr 1fr;
    grid-column: 1 / 4;
    column-gap: 20px;
    row-gap: 20px;
  }

  .section:nth-of-type(even) .article {
    grid-template-rows: min-content;
  }
}

@media (min-width: 576px) {
  .section-gallery {
    grid-template-columns: initial;
  }
}

.section__title,
.section__subtitle {
  color: var(--accent-decorations-color);
  font-size: 18px;
}

.section__content {
  display: grid;
  row-gap: 20px;
}

.title-decor {
  background-color: var(--accent-color);
  color: var(--background-color);
}

.article {
  display: grid;
  row-gap: 10px;
}

.article__title {
  font-size: 18px;
}

.title-thin {
  font-weight: 400;
}

.article__content {
  color: var(--text-color);
}

.section-gallery {
  row-gap: var(--gap-gallery);
}

.gallery {
  display: grid;
  gap: var(--gap-gallery);
  grid-template-columns: 1fr;
}

@media (min-width: 576px) {
  .gallery {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas:
      "sunset sunset ice-cream"
      "tape books ice-cream"
      "tape street street";
  }
}

.gallery__picture {
  max-width: 100%;
}

@media (min-width: 576px) {
  .gallery__picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .gallery__picture-sunset {
    grid-area: sunset;
  }

  .gallery__picture-ice-cream {
    grid-area: ice-cream;
  }

  .gallery__picture-tape {
    grid-area: tape;
  }

  .gallery__picture-books {
    grid-area: books;
  }

  .gallery__picture-street {
    grid-area: street;
  }
}

@media (min-width: 992px) {
  .gallery__picture-street {
    height: calc(100% - 5px);
    align-self: self-end;
  }
}

.footer {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  block-size: 100dvb;
  padding: var(--padding-header-footer);
  margin-top: var(--margin-between);
}

.footer__title {
  font-size: var(--text-header-footer-size);
  color: var(--title-color);
  text-shadow: 2px 2px 0px var(--title-shadow-color);
  line-height: var(--line-height-title);
}
